"use strict";

const { Controller } = require("../core/controller");

class UserController extends Controller {
  async getUser() {
    if(!this.verify()) return;
    const list = await this.ctx.service.user.getUser();
    // this.success(list);
    this.success({
      ...list[0],
      userId: "1",
      username: "vben",
      realName: "Vben Admin",
      avatar: "",
      desc: "manager",
      password: "123456",
      token: "fakeToken1",
      homePath: "/dashboard/analysis",
      roles: [
        {
          roleName: "Super Admin",
          value: "super",
        },
      ],
    });
  }
}

module.exports = UserController;
